home *** CD-ROM | disk | FTP | other *** search
- /* merge.asp */
-
- ARG pat
-
- ADDRESS ALPHASPELL
- OPTIONS RESULTS
-
- n = FileList(pat, files, "F", "E")
- i = 1
- x = 1
- DO WHILE x <= n
- first = files.x
- x = x + 1
- IF x > n THEN second = first
- ELSE DO
- second = files.x
- x = x + 1
- END
- dest = "words" || i || ".amd"
- i = i + 1
- "MERGE" first second dest
- IF RC == 0 THEN DO
- CALL DelDict(first)
- IF first ~= second THEN CALL DelDict(second)
- END
- END
-
- DO FOREVER
- n = FileList("*.amd", files, "F", "E")
- IF n == 1 THEN LEAVE
- x = 1
- DO WHILE x <= n
- first = files.x
- x = x + 1
- IF x > n THEN second = dest
- ELSE DO
- second = files.x
- x = x + 1
- END
- dest = "words" || i || ".amd"
- i = i + 1
- "MERGE" first second dest
- IF RC == 0 THEN DO
- CALL DelDict(first)
- CALL DelDict(second)
- END
- END
- END
-
- "QUIT"
- EXIT
-
- DelDict: PROCEDURE
- ARG file
- CALL Delete(file)
- file = Left(file, Length(file)-1) || x
- IF Exists(file) THEN CALL Delete(file)
- RETURN
-